package com.lg.wxq.bean;

import com.weibo.net.WeiboParameters;

public class Task {
	private int taskType;
	private int actID;
	private String url;
	private String requestMethod;
	private Object data;
	private WeiboParameters parameters;

	public Task(int actID, int taskType) {
		this.actID = actID;
		this.taskType = taskType;
		this.parameters=new WeiboParameters();
	}

	public void addParam(String key,Object value){
		parameters.add(key, value+"");
	}
	
	public void setTaskType(int taskType) {
		this.taskType = taskType;
	}

	public int getTaskType() {
		return taskType;
	}

	public void setActID(int actID) {
		this.actID = actID;
	}

	public int getActID() {
		return actID;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getUrl() {
		return url;
	}

	public WeiboParameters getParameters() {
		return parameters;
	}

	public void setRequestMethod(boolean isGet) {
		this.requestMethod=isGet?"GET":"POST";
	}

	public String getRequestMethod() {
		return requestMethod;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public Object getData() {
		return data;
	}
}
